<ui:composition template="/pages/templates/mainTemplate.xhtml"
		        xmlns:h="http://java.sun.com/jsf/html"
		        xmlns:f="http://java.sun.com/jsf/core"
		        xmlns:ui="http://java.sun.com/jsf/facelets"
		        xmlns:rich="http://richfaces.org/rich"
		        xmlns:a4j="http://richfaces.org/a4j">
		        
	<ui:param name="title" value="#{msgs['user.register.title']}" />
		        
	<ui:define name="main">
		<h:form>
			<h:panelGrid columns="2">
				<!-- Login -->
				<h:outputText value="#{msgs['login.text']}:" />
				<h:inputText label="#{msgs['login.text']}" value="#{userMB.user.login}" 
							 required="true" maxlength="20" size="10">
							 
					<f:validateLength minimum="6" maximum="20"/>
				</h:inputText>
	
				<!-- Senha -->
				<h:outputText value="#{msgs['password.text']}:" />
				<h:inputSecret label="#{msgs['password.text']}" value="#{userMB.user.password}" 
							   required="true" maxlength="10" size="10" redisplay="true">
							   
					<f:validateLength minimum="6" maximum="10"/>
				</h:inputSecret>
				
				<!-- Nome -->
				<h:outputText value="#{msgs['name.text']}:" />
				<h:inputText label="#{msgs['name.text']}" value="#{userMB.user.name}" 
							 required="true" maxlength="100" size="30">
				
					<f:validateLength minimum="10" maximum="100"/>
				</h:inputText>
				
				<!-- E-mail -->
				<h:outputText value="#{msgs['email.text']}:" />
				<h:inputText label="#{msgs['email.text']}" value="#{userMB.user.email}" 
							 required="true" maxlength="100" size="30">

					<f:validator validatorId="emailValidator" />
				</h:inputText>
			</h:panelGrid>
			
			<rich:spacer height="30px"/>
			
			<!-- Botões -->
			<h:commandButton value="#{msgs['save.text']}" action="#{userMB.saveMember}" />
			<h:commandButton value="#{msgs['clear.text']}" type="reset" />
		</h:form>
	</ui:define>
</ui:composition>